<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    body{
        margin: 0;
        padding: 0;
        background-color: #000;
    }
    .loader{
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 400px;
        height: 100px;
        text-align: center;
        line-height: 100px;
        color: aqua;
        font-size: 40px;
        text-transform: uppercase;
        letter-spacing: 15px;
        font-family: sans-serif;
        overflow: hidden;
    }
    .loader span{
        position: absolute;
        background-color: #fff;

    }
    .loader span:nth-child(1){
        width: 100%;
        height: 4px;
        top: 0;
        left: -100%;
        animation: animate1 2s linear infinite;
    }
    .loader span:nth-child(3){
        width: 100%;
        height: 4px;
        bottom: 0;
        right: -100%;
        animation: animate3 2s linear infinite;
    }
    .loader span:nth-child(2){
        width: 4px;
        height: 100%;
        right: 0;
        top: -100%;
        animation: animate2 2s linear infinite;
    }
    .loader span:nth-child(4){
        width: 4px;
        height: 100%;
        left: 0;
        bottom: -100%;
        animation: animate4 2s linear infinite;
    }

    @keyframes animate1 {
        0%{
            left: -100%;
        }
        20%{
            left: 0;
        }
        40%{
            left: 100%;
        }
        60%{
            left: 100%;
        }
        80%{
            left: 100%;
        }
        100%{
            left: 100%;
        }
    }
    @keyframes animate2 {
        0%{
            top: -100%;
        }
        20%{
            top: -100%;
        }
        40%{
            top:0;
        }
        60%{
            top: 100%;
        }
        80%{
            top: 100%;
        }
        100%{
            top: 100%;
        }
    }
    @keyframes animate3 {
        0%{
            right: -100%;
        }
        20%{
            right: -100%;
        }
        40%{
            right: -100%;
        }
        60%{
            right: 0;
        }
        80%{
            right: 100%;
        }
        100%{
            right: 100%;
        }
    }
    @keyframes animate4 {
        0%{
            bottom: -100%;
        }
        20%{
            bottom: -100%;
        }
        40%{
            bottom: -100%;
        }
        60%{
            bottom: -100%;
        }
        80%{
            bottom: 0;
        }
        100%{
            bottom: 100%;
        }
    }
</style>
<body>
    <div class="loader">
        Loading
        <span></span>
        <span></span>
        <span></span>
        <span></span>
    </div>
</body>


</html>